using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter33
{
	/// <summary>
	/// Example03: A Purely Capacitive AC Circuit
	/// An 8.00-\mu F capacitor is connected to the terminals 
	/// of a 60.0-Hz AC source whose rms voltage is 150 V. Find 
	/// the capacitive reactance and the rms current in the circuit.
	/// </summary>
	public class Example03
	{
		public Example03()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Frequency f = new L.Frequency();
			f.Hz = 60.0;
			L.ElectricPotentialDifference V 
				= new L.ElectricPotentialDifference();
			V.V = 150.0;
			L.Capacitance C = new L.Capacitance();
			C.F = 8.0E-6;
			double z = C.Reactance(f);
			result+=Convert.ToString(z);
			L.ElectricCurrent I = new L.ElectricCurrent();
			I.A = V.V/z;
			result+="    "+Convert.ToString(I.A);
		}
	}
}
